package com.eagle.security.controller;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.eagle.security.dao.PermissionDao;
import com.eagle.security.entries.User;
import com.eagle.security.service.RoleGroupManageService;
import com.eagle.security.service.UserManageService;

//@RequestMapping("/login")
@Controller
public class LoginController {
    @Resource
    private UserManageService userManage ; 
    
    @Resource
    private RoleGroupManageService roleGroupManage;
    
    @Resource
    private PermissionDao permissionDao ;
    

    @RequestMapping( value="/loginerror"  )
    public String aaaaa( ModelMap model ) {
        model.put("user", "xugang");
        userManage.findUsersByCond(null, 1, 20);
        return "/error";
    }
    
    @RequestMapping( value="/login"  )
    public String loginPage( ModelMap model ) {
        model.put("user", "xugang");
        return "/login";
    }
    
    
//	@RequestMapping( value="/loginAction"  )
//    public String loginAction( @RequestParam(value="username") String username,  @RequestParam(value="password") String password,   
//            ModelMap model ) {
//	    System.out.println("11");
//		model.put("user", "xugang");
//		return "/z_model";
//	}
       
}
